Skip to content

feat(views): add a compact "event-row" collection view#3339

Open
Vidminas wants to merge 2 commits into
HugoBlox:mainfrom
Vidminas:feat/event-row-view
Open

feat(views): add a compact "event-row" collection view#3339
Vidminas wants to merge 2 commits into
HugoBlox:mainfrom
Vidminas:feat/event-row-view

Conversation

@Vidminas

Copy link
Copy Markdown

πŸš€ What type of change is this?

  • πŸ› Bug fix (A non-breaking change that fixes an issue)
  • ✨ New feature (A non-breaking change that adds functionality)
  • πŸ’… Style change (A change that only affects formatting, visuals, or styling)
  • πŸ“š Documentation update (Changes to documentation only)
  • 🧹 Refactor or chore (A code change that neither fixes a bug nor adds a feature)
  • πŸ’₯ Breaking change (A fix or feature that would cause existing functionality to not work as expected)

🎯 What is the purpose of this change?

Adds a new event-row collection view β€” a compact horizontal row: small logo Β· title Β· date Β·
location, with the summary beneath. None of the existing views (card, article-grid,
citation, date-title-summary, slides-gallery) is a compact row like this, which is the
natural layout for talks / events / press mentions.

Three new files following the standard view convention (--start / view / --end):
layouts/_partials/views/event-row.html, event-row--start.html, event-row--end.html.

Built entirely on existing helpers (get_featured_image, get_event_dates, get_summary) and
folds in a few niceties learned the hard way:

  • Date + location stack on narrow screens and go inline with a separator from sm: up, so a
    wrapped line never opens with a lone "Β·".
  • The logo sits on a white chip even in dark mode β€” many event/press logos bake in a white
    background and otherwise vanish.
  • The summary is wrapped in a <div> (not <p>) so multi-paragraph output stays valid.

Enable it with design.view: event-row on a collection block. Verified on the academic-cv
starter by pointing the Talks collection at it: the event renders as a compact row (logo chip,
title link, stacked date/location) with no view-resolution error.


πŸ“Έ Screenshots or Screencast (if applicable)

The same three talks on the academic-cv starter β€” existing card view vs the new event-row view, in both light and dark themes. Note how much more compact the row view is (two cards fill the height of all three rows). The logo sits on a white chip so dark logos with a transparent background stay visible in dark mode.

view: event-row (the new view):

Light Dark
d1-after-light d1-after-dark

view: date-title-summary β€” the closest existing view (no logo, date only, no location, less contained):

Light Dark
d1-dts-light d1-dts-dark

view: card β€” the default view, for reference (much taller: two cards fill the height of all three rows above):

Light Dark
d1-before-light d1-before-dark

ℹ️ Documentation Check

  • No, this change does not require a documentation update.
  • Yes, I have updated the documentation accordingly (or will in a follow-up PR).

Included in this PR: the Collection block README
(modules/blox/blox/content-collection/README.md) gains an Available Views reference table
listing all six views β€” including the new event-row β€” with a "best for" note and a front-matter
usage example. It also corrects the pre-existing "Multiple Views" bullet, whose names (compact,
showcase, list, masonry) never matched the actual view slugs.


πŸ“œ Contributor Agreement

Thank you for your contribution!

Vidminas and others added 2 commits July 9, 2026 22:40
Adds a reusable compact row view (logo Β· title Β· date Β· location Β· summary)
for talks/events/press lists β€” none of the existing views (card, article-grid,
citation, date-title-summary, slides-gallery) is a compact horizontal row.

- Uses the existing get_featured_image / get_event_dates / get_summary helpers.
- Date + location stack on narrow screens and go inline with a separator from
  sm: up, so a wrapped line never opens with a lone separator.
- Logo sits on a white chip even in dark mode (many event/press logos bake in a
  white background).
- Summary is wrapped in a <div> (not <p>) to support multi-paragraph output.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an "Available Views" reference table to the Collection block README
covering all six views (card, article-grid, citation, date-title-summary,
slides-gallery, event-row) with a "best for" note, a layout description,
and a front-matter usage example.

Also corrects the "Multiple Views" feature bullet, which listed view names
(compact, showcase, list, masonry) that never matched the actual view slugs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Vidminas
Vidminas requested a review from gcushen as a code owner July 11, 2026 08:36
@netlify

netlify Bot commented Jul 11, 2026

Copy link
Copy Markdown

βœ… Deploy Preview for academic-demo canceled.

Name Link
πŸ”¨ Latest commit a8b0c8c
πŸ” Latest deploy log https://app.netlify.com/projects/academic-demo/deploys/6a52009c2afcc70008e25963

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant